<!DOCTYPE html>
<html lang='en'>
<head>
  <meta charset='UTF-8'>
  <title>Solid.JS</title>
</head>
<body>
  <script type="module">
    import { createSignal, onCleanup } from "https://cdn.skypack.dev/solid-js";
    import { render } from "https://cdn.skypack.dev/solid-js/web";
    import html from "https://cdn.skypack.dev/solid-js/html";

    const App = () => {
      const [count, setCount] = createSignal(0),
        timer = setInterval(() => setCount(count() + 1), 1000);
      onCleanup(() => clearInterval(timer));
      return html`<div>${count}</div>`;
    };
    render(App, document.body);
  </script>
</body>
</html>
